<!DOCTYPE html>
<html lang="zh">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>你正在跳转至:</title>
    <script>
        const search = {}
        location.search.slice(1).split('&').forEach(a => {
            const b = a.split('=')
            search[b[0]] = b[1]
        })
        var jump = search.href || '/'
        document.getElementsByTagName('title')[0].innerText += jump
    </script>
    <link rel="shortcut icon" href="./img/favicon.png" type="image/x-icon">
    <style>
        body {
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
            background-color: #ccc;
            color: #333;
        }

        .box {
            display: flex;
            justify-content: center;
            align-items: center;
            flex-direction: column;
            width: 26rem;
            height: 12rem;
            box-shadow: 0 0 0.25rem 0 rgba(51, 51, 51, 0.2);
            background-color: #efefef;
            max-width: calc(100vh - 2rem);
        }
    </style>
</head>

<body>
    <div class="box">
        <div>
            你正在跳转至: &nbsp;<span style="text-decoration: underline;cursor: pointer;" id="jump"></span>
            <script>
                const e = document.getElementById('jump')
                e.innerText = jump
            </script>
        </div>
        <div style="margin-top: 0.5rem;">
            预计<span id="time">3</span>秒后跳转
            <script>
                const t = document.getElementById('time')
                const d1 = setTimeout(() => {
                    t.innerText = 2
                }, 1000)
                const d2 = setTimeout(() => {
                    t.innerText = 1
                }, 2000)
                const d3 = setTimeout(() => {
                    t.innerText = 0
                    location.replace(jump)
                }, 3000)
                e.onclick = function () {
                    clearTimeout(d1)
                    clearTimeout(d2)
                    clearTimeout(d3)
                    t.innerText = 0
                    location.replace(jump)
                }
            </script>
        </div>
    </div>
</body>

</html>